<template>
  <div id="left_con">
    <div>子组件1</div>
    <div>
      <el-button type="primary" @click="cutColor">切换颜色按钮</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'left',
  data() {
    return {
      back: ''
    }
  },
  methods: {
    cutColor() {
      this.back = '#0050EF'
      this.$emit('cutColor', { back: this.back })
    }
  }
}
</script>

<style lang="less" scoped>
#left_con {
  width: 200px;
  height: 300px;
  margin: 0 auto;
  background-color: #dae8fc;
  display: flex;
  flex-flow: column;
  border: 1px solid #6c8ebf;
  div {
    flex: 1;
    line-height: 150px;
    text-align: center;
  }
}
</style>
